local skel = fk.CreateSkill {
  name = "emo__yumeiren",
}

Fk:loadTranslationTable{
  ["emo__yumeiren"] = "虞美人",
  [":emo__yumeiren"] = "每两回合限两次，出牌阶段，你可以令一名角色获得<a href=':emo__feihuamark&'>“绯花”</a>。若其已有“绯花”，其回复两点体力。",

  ["#emo__yumeiren"] = "虞美人：令一名角色获得“绯花”，若其有，其回复2点体力",
  ["@@emo__feihuamark"] = "<font color='#ff3366'>绯花</font>",

  ["$emo__yumeiren1"] = "努力的孩子，我会认可你的。",
  ["$emo__yumeiren2"] = "享受被花儿们簇拥的时刻吧。",
}

skel:addEffect("active", {
  anim_type = "support",
  card_num = 0,
  target_num = 1,
  prompt = "#emo__yumeiren",
  target_filter = function (self, player, to_select, selected)
    return #selected == 0
  end,
  can_use = function(self, player)
    return player:usedSkillTimes(self.name, Player.HistoryPhase) < 2
  end,
  times = function (self, player)
    return 2 - player:usedSkillTimes(self.name, Player.HistoryPhase)
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    if to:hasSkill("emo__feihuamark&", true) then
      room:recover { num = 2, skillName = skel.name, who = to, recoverBy = player }
    else
      room:setPlayerMark(to, "@@emo__feihuamark", 1)
      room:handleAddLoseSkills(to, "emo__feihuamark&")
      room:addTableMarkIfNeed(player, "emo__feihua_tar", to.id)
    end
  end,
})

-- 添加伤害记录器
skel:addAcquireEffect(function (self, player, is_start)
  player.room:addSkill("#emo__feihua_record")
end)

return skel
